<?php 
@session_start();
include_once '../config/DatabaseHandler.php';
include_once '../classes/Plan.php';
include_once '../classes/Zona.php';
include_once '../classes/Especialidad.php';
include_once '../classes/Prestador.php';
include_once '../utils/html-utils.php';
include_once '../controllers/loginController.php';
secure('ROL_ADMIN');
?>
<head>
		<?php include 'json.php';?>
		<script src="/js/abm-cartilla.js" type="text/javascript"></script>
		<script src="/js/busqueda.js" type="text/javascript"></script>
		<link rel="stylesheet" href="/css/busqueda.css">
		<link rel="stylesheet" href="/css/base/jquery.ui.all.css">
	    <link rel="stylesheet" href="/css/base/jquery.ui.theme.css">
	    <link rel="stylesheet" href="/css/demo_table.css">
	    <link rel="stylesheet" href="/css/demo_table_jui.css">
		<script src="/js/jquery-ui/ui/jquery.ui.core.js"></script>
		<script src="/js/jquery-ui/ui/jquery.ui.widget.js"></script>
		<script src="/js/jquery-ui/ui/jquery.ui.dialog.js"></script>
		<script src="/js/jquery.dataTables.js"></script>
		<link rel="stylesheet" href="/css/ui-lightness/jquery.ui.all.css">
		<link rel="stylesheet" href="/css/ui-lightness/jquery.ui.theme.css">
		<link rel="stylesheet" href="/css/demo_table.css">
		<link rel="stylesheet" href="/css/demo_table_jui.css">
		</head>
<?php 
		$db = new DatabaseHandler();
    	$db->connect();
    	 
    	
	?>
<?php include 'cartilla_busqueda_form.php';?>


<div id="resultado_container">
	
</div>

<div id="dialogo" style="display:none;">
	<label>Plan:</label>
	
	<?php 
	$db->cleanResults();
	$db->select(Plan::getNombreTabla());
	dibujar_select($db->getResult(), 'id', 'descripcion', 'plan', '');?>
	<label>Prestador</label><?php 
	$db->cleanResults();
	$db->select(Prestador::getNombreTabla());
	dibujar_select($db->getResult(), 'id', 'razonSocial', 'prestador', '');
	?>
	
	<input type="hidden" id="id_entrada_cartilla"/>
	<p>* campo obligatorio</p>
</div>
